# To change this template, choose Tools | Templates
# and open the template in the editor.

class Word():
    def __init__(self, name, parent):
        self.name = name
        self.parent = parent        
        self.translations = []
        self.associations = []

    def get_name(self):
        return self.name

    def update_name(self, name):
        self.name = name
        return self.name

    def get_parent(self):
        return self.parent

    def get_translations(self):
        return self.translations

    def get_associations(self):
        return self.associations

    def update_translations(self, word):
        self.translations.append(word)
        return self.translations

    def update_associations(self, word):
        self.associations.append(word)
        return self.associations

    def equals(self, word):
        if self.name == word.get_name():
            return True
        else:
            return False

